import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:lottie/lottie.dart';

class Finish extends StatelessWidget {
  const Finish({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
        child: TextButton(
            onPressed: () => finishWidget(context), child: const Text("点击按钮")));
  }
}

finishWidget(context) {
  showDialog(
      context: context,
      builder: (context) {
        Future.delayed(const Duration(seconds: 2), () {
          Get.back();
        });
        return Lottie.asset("lottie/finish.json");
      });
}
